package com.gomore.opple.module.account;


import com.gomore.opple.BasePresenter;
import com.gomore.opple.BaseView;
import com.gomore.opple.model.ShippingAddress;
import com.gomore.opple.rest.employee.LoginResult;
import com.gomore.opple.rest.order.OrderBill;
import com.gomore.opple.web.cgform.consumer.entity.TOConsumerEntity;
import com.gomore.opple.web.cgform.shippingaddr.entity.TOShippingAddrEntity;

import java.util.List;

public interface AccountContract {

    interface View extends BaseView<Presenter> {

        /**
         * 显示进度条
         */
        void showProgressDialog();

        /**
         * 隐藏进度条
         */
        void hideProgressDialog();

        /**
         * 展示消息
         *
         * @param msg 消息
         */
        void showMessage(String msg);

        /**
         * 展示消息
         *
         * @param msgId 消息id
         */
        void showMessage(int msgId);

        /**
         * 展示客户信息
         */
        void ShowConsumer(TOConsumerEntity toConsumerEntity);

        /**
         * 展示地址列表
         */
        void showAddress();

        /**
         * 跳转到支付界面
         *
         * @param orderId
         */
        void goToOrderPay(String orderId);

        /**
         * 删除购物车
         */
        void deleteShoppingCar();

    }

    interface Presenter extends BasePresenter {

        /**
         * 准备初始化数据
         */
        void prepareInitData();

        /**
         * 获取收货人地址
         */
        void queryAddress();

        /**
         * 获取地址数据
         */
        List<ShippingAddress> getAddressData();

        /**
         * 获取用户信息
         *
         * @return
         */
        LoginResult getUser();

        /**
         * 保存订单
         */
        void saveOrder(OrderBill orderBill);
    }
}
